package com.itheima.charest;

import java.io.*;
import java.util.Arrays;

public class CharStreamDemo07 {
    public static void main(String[] args) throws IOException {
        BufferedReader br=new BufferedReader(new FileReader("ChaStream\\abc.txt")) ;
        String line = br.readLine();
        String[] split = line.split(" ");
        int[] arr=new int[split.length];
        for (int i = 0; i < split.length; i++) {
          arr[i] =Integer.parseInt(split[i]);
        }
        Arrays.sort(arr);
        br.close();
        BufferedWriter bw=new BufferedWriter(new FileWriter("ChaStream\\b.txt"));
        for (int i = 0; i < arr.length; i++) {
            bw.write(arr[i]+" ");
        }
        bw.close();
    }
}
